package com.zgz.underwrite.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;




/**
 * 车辆
 * @author zgz
 *
 */
@Entity
@Table(name="vehicle")
public class Vehicle implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3728978328364519557L;

	@Id
	@GenericGenerator(name="idGenerator", strategy="uuid") 
	@GeneratedValue(generator="idGenerator") 
	private String SVehicleId; //车辆唯一标识
	private String SPlateNo; //车牌号码
	private String SFrmNo;//车架号
	private String SEngNo;//发动机号
	private String SBrand;//品牌
	private String SModel;//车型
	private String SUsage;//使用性质
	private String SType;//车辆类型
	private Long NSeatNum;//座位数
	@Column(columnDefinition="Date")
	private String SFstRegYm;//初登年月
	private Double NNewPurchaseValue;//新车购置价
	private String SRunArea;//行驶区域
	private Double NTonage;//吨位数
	
	@ManyToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="vhlOwnerId")
	private VhlOwner vhlOwner;
	
	@ManyToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="vhlDriverId")
	private VhlDriver vhlDriver;
	

	
	public enum Usage{
		家庭自用,企业非营业,党政机关事业团体非营业客车,非营业货车,公路客运营业客车,
		城市公交营业客车,企业非营业客车,特种车,营业出租租赁,营业货车
	}



	public String getSPlateNo() {
		return SPlateNo;
	}


	public void setSPlateNo(String plateNo) {
		SPlateNo = plateNo;
	}


	public String getSFrmNo() {
		return SFrmNo;
	}


	public void setSFrmNo(String frmNo) {
		SFrmNo = frmNo;
	}


	public String getSEngNo() {
		return SEngNo;
	}


	public void setSEngNo(String engNo) {
		SEngNo = engNo;
	}


	public String getSModel() {
		return SModel;
	}


	public void setSModel(String model) {
		SModel = model;
	}


	public String getSUsage() {
		return SUsage;
	}


	public void setSUsage(String usage) {
		SUsage = usage;
	}


	public String getSType() {
		return SType;
	}


	public void setSType(String type) {
		SType = type;
	}


	public Long getNSeatNum() {
		return NSeatNum;
	}


	public void setNSeatNum(Long seatNum) {
		NSeatNum = seatNum;
	}


	public String getSFstRegYm() {
		return SFstRegYm;
	}


	public void setSFstRegYm(String fstRegYm) {
		SFstRegYm = fstRegYm;
	}


	public Double getNNewPurchaseValue() {
		return NNewPurchaseValue;
	}


	public void setNNewPurchaseValue(Double newPurchaseValue) {
		NNewPurchaseValue = newPurchaseValue;
	}


	public String getSRunArea() {
		return SRunArea;
	}


	public void setSRunArea(String runArea) {
		SRunArea = runArea;
	}


	public void setNTonage(Double nTonage) {
		NTonage = nTonage;
	}


	public Double getNTonage() {
		return NTonage;
	}


	public void setVhlOwner(VhlOwner vhlOwner) {
		this.vhlOwner = vhlOwner;
	}


	public VhlOwner getVhlOwner() {
		return vhlOwner;
	}


	public void setVhlDriver(VhlDriver vhlDriver) {
		this.vhlDriver = vhlDriver;
	}


	public VhlDriver getVhlDriver() {
		return vhlDriver;
	}


	public void setSBrand(String sBrand) {
		SBrand = sBrand;
	}


	public String getSBrand() {
		return SBrand;
	}


	public void setSVehicleId(String sVehicleId) {
		SVehicleId = sVehicleId;
	}


	public String getSVehicleId() {
		return SVehicleId;
	}


}
